1. Field of the Invention
The present invention relates to a Universal Serial Bus (USB) device, and more particularly, to a data transfer method for a USB device.
2. Description of the Related Art
A Universal Serial Bus (USB) is an interface used for connecting the peripheral device with a computer device such as a desktop computer, a notebook computer, and a Personal Digital Assistant (PDA). Since it is hot-swappable, a user can easily plug the peripheral device into or remove it from the computer device. The computer device can automatically detect the peripheral device for maintaining its normal operation when the peripheral device is plugged into or removed from the computer device. Therefore, USB has interfaces have been widely applied in peripheral devices such as keyboards, mice, network adapters, and printers. Moreover, since it is convenient to add or remove a peripheral device with a USB interface, a storage device using die USB interface has been developed to facilitate the data transfer and data sharing between different computers.
There are four kinds of transfer transmission defined in the USB protocol (bulk, control, interrupt and isochronous). The most frequently used transfer transmission is bulk transfer. The bulk transfer transmission is commonly used in the USB storage device for transmitting a great amount of data. The bulk transfer transmission has a USB hand shake mechanism, thus it can guarantee the correctness of the data transfer. However, among various USB transmissions, since the bulk transfer transmission cannot guarantee the data transfer bandwidth, when several USB devices are using a USB simultaneously, the bandwidth of the device using the bulk transfer transmission is divided and shared by all USB devices in the USB and the transfer rate is degraded.
FIG. 1 is a transfer rate sharing diagram of a USB connecting to different quantities of USB devices using bulk transfer transmission. It is assumed that the maximum data transfer rate for the USB is 48 Mbytes/sec, and there are three devices, A, B, and C, each having only one bulk endpoint. In FIG. 1(a), only device A is connected to the USB, and the data transfer rate of device A is up to 48 Mbytes/sec. In FIG. 1(b), both devices A and B are connected to a same USB and use the USB simultaneously, and the shared data transfer rate of each device A and B is 24 Mbytes/sec, respectively. In FIG. 1(c), all device A, B, and C are connected to the USB and use the USB simultaneously, and the shared data transfer rate of each device A, B, and C is 16 Mbytes/sec, respectively. In other words, when the number of the USB devices connected to the USB increases, the data transfer rate of each USB device is decreased due to the shared bandwidth, thus it cannot meet the desired expectation.